package com.union.official.dao.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.union.official.entity.model.CityDO;
import com.union.official.entity.vo.request.CityReqVO;
import com.union.official.mapper.CityMapper;
import com.union.official.dao.CityDao;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * 城市表 服务实现类
 * </p>
 *
 * @author union
 * @since 2024-03-06
 */
@Service
public class CityDaoImpl extends ServiceImpl<CityMapper, CityDO> implements CityDao {

    @Resource
    private CityMapper cityMapper;

    @Override
    public IPage<CityDO> hello(CityReqVO reqVO) {
        return cityMapper.selectByIds(new Page<>(reqVO.getPageNum(), reqVO.getPageSize()), reqVO);
    }
}
